﻿@model Sharp.Web.Models.MessageModel
@using Ext.Net
@using Ext.Net.MVC
@using Sharp.Web
@{
    var x = Html.X();
}
@(
        x.Window().Layout(LayoutType.Fit).Title("添加")
            .CloseAction(CloseAction.Destroy)
            .Width(700)            .Items(
                x.FormPanel().Default()
.Layout(LayoutType.Column).Items(x.HiddenFor(m => m.Id),x.TextFieldFor(m => m.Title).ColumnWidth(.5).Padding(4),x.TextFieldFor(m => m.Summary).ColumnWidth(.5).Padding(4),x.HtmlEditorFor(m => m.Content).ColumnWidth(1).Padding(4),x.DateFieldFor(m => m.PublishTime).ColumnWidth(.5).Padding(4),x.DateFieldFor(m => m.RemindTime).ColumnWidth(.5).Padding(4))
                    .Buttons(

                        x.Button().Text("提交").Icon(Icon.Disk).Hidden(false)                            .DirectEvents(de =>
                            {
                                de.Click.Before = "App.Edit.submitReady";
                                de.Click.Action = "Save";
                                de.Click.EventMask.ShowMask = true;
                                de.Click.EventMask.Msg = "正在提交...";
                                de.Click.EventMask.MinDelay = 1000;
                                de.Click.Success = "App.Edit.PostBackSuccess";
                            }),
                        x.Button().Text("关闭").Icon(Icon.Cancel).OnClientClick("App.Edit.CloseWindow(this)")
                    )
            )
)
